Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suspicious Loop Detector #206

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
Open

Conversation

Esorat
Copy link
Member

@Esorat Esorat commented Nov 3, 2024

Closes #171

  • I have updated CHANGELOG.md
  • I have added tests to demonstrate the contribution is correctly implemented
  • No test failures were reported when running yarn test-all
  • I did not do unrelated and/or undiscussed refactorings

@jubnzv jubnzv changed the title WIP: Suspicious Loop Detector Suspicious Loop Detector Nov 4, 2024
@jubnzv jubnzv marked this pull request as draft November 4, 2024 10:25
@Esorat Esorat marked this pull request as ready for review January 5, 2025 13:20
test/detectors/NeverAccessedVariables.tact Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
@Esorat Esorat requested a review from jubnzv January 25, 2025 05:16
stmt.kind === "statement_while" ||
stmt.kind === "statement_repeat" ||
stmt.kind === "statement_until" ||
stmt.kind === "statement_foreach"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should not consider foreach here

* @param stmt - The statement to evaluate.
* @returns True if the expression is suspicious, otherwise false.
*/
private isSuspiciousCondition(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Create two separate function to check integers and booleans.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Suspicious Loop
2 participants